<template>
  <el-select v-model="country" clearable placeholder="请选择" filterable @change="send2Parent" >
    <el-option v-for="item in countryOptions"
               :key="item.label" :label="item.label" :value="item.value"
    ></el-option>
  </el-select>
</template>

<script>
import country from "../utils/countries";
export default {
  name: "CountrySelector",
  props: ['country'],
  data(){
    return{
      countryOptions:country
    }
  },
  methods:{
    send2Parent(){
      this.$emit('setCountry',this.country)
    }
  }
}
</script>

<style scoped>

</style>